const mongoose = require('mongoose');
const { typeModel } = require('./../models/typeModel');


//获取全部考试种类
async function getAll(req,res){
    let result=await mongoose.model(typeModel).find();
    res.send(result)
}
//获取种类
async function find(req,res){
    let result=await mongoose.model(typeModel).find({_id:req.params.id});
    res.send(result)
}
module.exports={getAll,find}